<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>传智健康</title>
	<meta name="description" content="传智健康">
	<meta name="keywords" content="传智健康">
	<meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
	<!-- 引入样式 -->
	<link rel="stylesheet" href="../plugins/elementui/index.css">
	<link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css">
	<link rel="stylesheet" href="../css/style.css">
	<style>
		.el-table .warning-row {
			background: oldlace;
		}

		.el-table .success-row {
			background: #f0f9eb;
		}
	</style>
</head>
<body class="hold-transition">
<div id="app">
	<div class="content-header">
		<h1>系统设置
			<small>日志管理</small>
		</h1>
		<el-breadcrumb separator-class="el-icon-arrow-right" class="breadcrumb">
			<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
			<el-breadcrumb-item>系统设置</el-breadcrumb-item>
			<el-breadcrumb-item>日志管理</el-breadcrumb-item>
		</el-breadcrumb>
	</div>
	<template>
		<el-table
				:data="tableData"
				style="width: 100%"
				:row-class-name="tableRowClassName">
			<el-table-column
					prop="createBy"
					label="操作人"
			>
			</el-table-column>
			<el-table-column
					prop="description"
					label="操作">
			</el-table-column>

			<el-table-column
					prop="createDate"
					label="操作时间">
			</el-table-column>
			<el-table-column
					prop="requestIp"
					label="请求IP">
			</el-table-column>
		</el-table>
	</template>
</div>
</div>
</body>
<!-- 引入组件库 -->
<script src="../js/vue.js"></script>
<script src="../plugins/elementui/index.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script src="../js/axios-0.18.0.js"></script>
<script src="../js/status.js"></script>
<script>
    var vue = new Vue({
        el: "#app",
        data: {
            tableData: []
		},
        mounted() {
            axios.get("/log/findAll.do").then(res => {
                console.log(res);
                this.tableData = res.data.data;
            });
        },
        methods: {
            tableRowClassName({row, rowIndex}) {
                if (rowIndex === 1) {
                    return 'warning-row';
                } else if (rowIndex === 3) {
                    return 'success-row';
                }
                return '';
            }
		}
    });
</script>
</html>